package com.me.service;

import com.me.annotation.Inject;
import com.me.dao.DbContext;
import com.me.dao.db.DbSet;
import com.me.model.Type;

public class TypeService {
    private DbSet<Type> types;

	@Inject
    public TypeService(DbContext ctx) {
        this.types = ctx.getTypes();
    }

    public String getName(String id) {
        Type t = types.find("id", id);
        return t == null ? "错误的参数" : t.getName();
    }
}
